home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0428.dms / q0428.adf / libray / libray.diffs < prev    next >
Text File  |  1992-05-20  |  3KB  |  113 lines

  1. diff -d +context /rs4/libray/libtext/checker.c libray/libtext/checker.c
  2. *** /rs4/libray/libtext/checker.c    Thu Aug 08 18:58:44 1991
  3. --- libray/libtext/checker.c    Tue May 12 18:00:58 1992
  4. ***************
  5. *** 49,58 ****
  6.   {
  7.       int xp, yp, zp;
  8.   
  9.       xp = pos->x > 0. ? pos->x : 1. - pos->x;
  10.       yp = pos->y > 0. ? pos->y : 1. - pos->y;
  11.       zp = pos->z > 0. ? pos->z : 1. - pos->z;
  12.       if ((xp + yp + zp) % 2)
  13.           *surf = *checker->surf;
  14.       /* else surface stays the same. */
  15. --- 49,63 ----
  16.   {
  17.       int xp, yp, zp;
  18.   
  19. + #ifdef MFPU
  20. +     xp = (int)(floor((pos->x > 0.) ? pos->x : 1. - pos->x));
  21. +     yp = (int)(floor((pos->y > 0.) ? pos->y : 1. - pos->y));
  22. +     zp = (int)(floor((pos->z > 0.) ? pos->z : 1. - pos->z));
  23. + #else
  24.       xp = pos->x > 0. ? pos->x : 1. - pos->x;
  25.       yp = pos->y > 0. ? pos->y : 1. - pos->y;
  26.       zp = pos->z > 0. ? pos->z : 1. - pos->z;
  27. ! #endif
  28.       if ((xp + yp + zp) % 2)
  29.           *surf = *checker->surf;
  30.       /* else surface stays the same. */
  31. diff -d +context /rs4/libray/libtext/marble.c libray/libtext/marble.c
  32. *** /rs4/libray/libtext/marble.c    Thu Aug 08 18:59:02 1991
  33. --- libray/libtext/marble.c    Tue May 12 18:00:44 1992
  34. ***************
  35. *** 50,56 ****
  36. --- 50,60 ----
  37.   
  38.       val = Marble(pos);
  39.       if (marble->colormap) {
  40. + #ifdef MFPU
  41. +         index = (int)(floor(255. * val));
  42. + #else
  43.           index = (int)(255. * val);
  44. + #endif
  45.           surf->diff.r *= marble->colormap[index].r;
  46.           surf->diff.g *= marble->colormap[index].g;
  47.           surf->diff.b *= marble->colormap[index].b;
  48. diff -d +context /rs4/libray/libtext/noise.c libray/libtext/noise.c
  49. *** /rs4/libray/libtext/noise.c    Thu Aug 08 19:00:00 1991
  50. --- libray/libtext/noise.c    Tue May 12 18:09:58 1992
  51. ***************
  52. *** 92,98 ****
  53. --- 92,102 ----
  54.       for (i = 0; i < 4096; i++)
  55.           hashTable[i] = i;
  56.       for (i = 4095; i > 0; i--) {
  57. + #ifdef MFPU
  58. +         j = (int)(floor(nrand() * 4096));
  59. + #else
  60.           j = (int)(nrand() * 4096);
  61. + #endif
  62.           temp = hashTable[i];
  63.           hashTable[i] = hashTable[j];
  64.           hashTable[j] = temp;
  65. ***************
  66. *** 161,167 ****
  67. --- 165,175 ----
  68.       x = point->x - MINX; y = point->y - MINY; z = point->z - MINZ;
  69.   
  70.       /* its equivalent integer lattice point. */
  71. + #ifdef MFPU
  72. +     ix = (int)floor(x); iy = (int)floor(y); iz = (int)floor(z);
  73. + #else
  74.       ix = (int)x; iy = (int)y; iz = (int)z;
  75. + #endif
  76.       jx = ix+1; jy = iy + 1; jz = iz + 1;
  77.   
  78.       sx = SCURVE(x - ix); sy = SCURVE(y - iy); sz = SCURVE(z - iz);
  79. ***************
  80. *** 217,223 ****
  81. --- 225,235 ----
  82.       x = point->x - MINX; y = point->y - MINY; z = point->z - MINZ;
  83.   
  84.       /* its equivalent integer lattice point. */
  85. + #ifdef MFPU
  86. +     ix = (int)floor(x); iy = (int)floor(y); iz = (int)floor(z);
  87. + #else
  88.       ix = (int)x; iy = (int)y; iz = (int)z;
  89. + #endif
  90.       jx = ix+1; jy = iy + 1; jz = iz + 1;
  91.   
  92.       sx = SCURVE(x - ix); sy = SCURVE(y - iy); sz = SCURVE(z - iz);
  93. diff -d +context /rs4/libray/libobj/roots.c libray/libobj/roots.c
  94. *** /rs4/libray/libobj/roots.c    Thu Aug 08 18:59:42 1991
  95. --- libray/libobj/roots.c    Tue May 12 13:19:45 1992
  96. ***************
  97. *** 26,32 ****
  98. --- 26,38 ----
  99.   
  100.   #include "libcommon/common.h"
  101.   
  102. + #ifndef AMIGA
  103. + extern double   sqrt(), cbrt(), cos(), acos();
  104. + #else
  105. + #ifndef MFPU
  106.   extern double   sqrt(), cbrt(), cos(), acos();
  107. + #endif
  108. + #endif
  109.   
  110.   /* epsilon surrounding for near zero values */
  111.   
  112.